/*
Copyright (c) 2008 Silicon Laboratories, Inc.
2008-04-03 17:59:58 */
/*ProSLIC API Tool Rev0.31 Alpha*/


#include "proslic.h"
#include "si321x.h"

Si321x_General_Cfg Si321x_General_Configuration = {
	0xff,
		0xff,
		0xff
};

#define AUDIOGAIN_0DB	0

Si321x_audioGain_Cfg Si321x_AudioGain_Presets [] = {
	{AUDIOGAIN_0DB,0x4000}
};
Si321x_PulseMeter_Cfg Si321x_PulseMeter_Presets [] = {
	{0,0,0,0,0}
};

Si321x_Ring_Cfg Si321x_Ring_Presets[] ={


    /* inputs:  ringtrip ac thresh = 0.036, rt debounce = 0.075*/
    { 0x155, 0x0, 0x0, 0x7EFD, 0x80, 0x3E, 0x0, 0x7D, 0x18, 0xA, 0x320 }
};

Si321x_DCfeed_Cfg Si321x_Dcfeed_Presets[] = {

    /* inputs: voc=48.000, vcm=3.000, ilim=20.000*/
    { 0x0, 0x20, 0x2 }
};

Si321x_Zsynth_Cfg Si321x_Zsynth_Presets [] ={

{ 0x0, 0x0  },
{ 0x0, 0x1  }
};

Si321x_FSK_Cfg Si321x_FSK_Presets[] ={

    /* inputs: mark freq=1200.000, space freq2200.000, amp=0.220, baud=1200.000 */
    { 0x1119L, 0x3BE1L, 0x1E0L, 0x100L, 0x35B0L, 0x3CE0L }
};

/*
** Tone Generator configuration
*/
#define OSC_TOPHONE 0x2
#define OSC_350HZ_MINUS18DBM_8KHZ	0x7b30,0x63,0
#define OSC_350HZ_MINUS18DBM_16KHZ	0x7ed0,0x31,0
#define OSC_NOTIME				0,0
#define OSC_0_5SEC				0xa0,0xf
#define OSC_0_3SEC				0x60,0x9
#define OSC_0_2SEC				0x40,0x6
#define OSC_4SEC				0x0,0x7d
#define	OSC_2SEC				0x80,0x3e
#define OSC_440HZ_MINUS18DBM_8KHZ	0x7870,0x7d,0 
#define OSC_440HZ_MINUS18DBM_16KHZ	0x7e20,0x3d,0 
#define OSC_480HZ_MINUS18DBM_8KHZ	0x7700,0x89,0
#define OSC_480HZ_MINUS18DBM_16KHZ	0x7dc0,0x43,0
#define OSC_620HZ_MINUS18DBM_8KHZ	0x7120,0xb2,0
#define OSC_620HZ_MINUS18DBM_16KHZ	0x7c40,0x57,0

/*Si3210 Tone generator (8kHz) */
Si321x_Tone_Cfg Si321x_Tone_Presets [] = {
{{OSC_350HZ_MINUS18DBM_8KHZ,OSC_NOTIME,OSC_NOTIME},{OSC_440HZ_MINUS18DBM_8KHZ,OSC_NOTIME,OSC_NOTIME},OSC_TOPHONE,OSC_TOPHONE},
{{OSC_480HZ_MINUS18DBM_8KHZ,OSC_0_5SEC,OSC_0_5SEC},{OSC_620HZ_MINUS18DBM_8KHZ,OSC_0_5SEC,OSC_0_5SEC},OSC_TOPHONE,OSC_TOPHONE},
{{OSC_480HZ_MINUS18DBM_8KHZ,OSC_0_2SEC,OSC_0_3SEC},{OSC_620HZ_MINUS18DBM_8KHZ,OSC_0_2SEC,OSC_0_3SEC},OSC_TOPHONE,OSC_TOPHONE},
{{OSC_480HZ_MINUS18DBM_8KHZ,OSC_2SEC,OSC_4SEC},{OSC_440HZ_MINUS18DBM_8KHZ,OSC_2SEC,OSC_4SEC},OSC_TOPHONE,OSC_TOPHONE},
{{OSC_480HZ_MINUS18DBM_8KHZ,OSC_0_3SEC,OSC_0_2SEC},{OSC_620HZ_MINUS18DBM_8KHZ,OSC_0_3SEC,OSC_0_2SEC},OSC_TOPHONE,OSC_TOPHONE}
};

Si321x_Tone_Cfg Si3215_Tone_Presets [] = {
{{OSC_350HZ_MINUS18DBM_16KHZ,OSC_NOTIME,OSC_NOTIME},{OSC_440HZ_MINUS18DBM_16KHZ,OSC_NOTIME,OSC_NOTIME},OSC_TOPHONE,OSC_TOPHONE},
{{OSC_480HZ_MINUS18DBM_16KHZ,OSC_0_5SEC,OSC_0_5SEC},{OSC_620HZ_MINUS18DBM_16KHZ,OSC_0_5SEC,OSC_0_5SEC},OSC_TOPHONE,OSC_TOPHONE},
{{OSC_480HZ_MINUS18DBM_16KHZ,OSC_0_2SEC,OSC_0_3SEC},{OSC_620HZ_MINUS18DBM_16KHZ,OSC_0_2SEC,OSC_0_3SEC},OSC_TOPHONE,OSC_TOPHONE},
{{OSC_480HZ_MINUS18DBM_16KHZ,OSC_2SEC,OSC_4SEC},{OSC_440HZ_MINUS18DBM_16KHZ,OSC_2SEC,OSC_4SEC},OSC_TOPHONE,OSC_TOPHONE},
{{OSC_480HZ_MINUS18DBM_16KHZ,OSC_0_3SEC,OSC_0_2SEC},{OSC_620HZ_MINUS18DBM_16KHZ,OSC_0_3SEC,OSC_0_2SEC},OSC_TOPHONE,OSC_TOPHONE}
};

Si321x_PCM_Cfg Si321x_Pcm_Presets[] ={

    /* inputs:  u-law narrowband positive  */
    { 0x1, 0x0, 0x0 },
    /* inputs:  16 bit wideband positive  */
    { 0x3, 0x1, 0x0 }
};

